package collection;

import java.util.HashSet;
import java.util.Iterator;
import java.util.TreeSet;

public class HashSetTest {
	public static void main(String[] args) {
		//HashSet<String> hs = new HashSet<String>();
		TreeSet<String> hs = new TreeSet<String>();
		hs.add("vibhanshu");
		hs.add("vibhanshu");
		hs.add("vibhanshu");
		hs.add("vibhanshu");
		hs.add("vibhanshu");
		hs.add("vibhanshu");
		hs.add("rajeev");
		hs.add("praveen");
		hs.add("praveen");
		Iterator<String> itr = hs.iterator();
		while(itr.hasNext()){
			System.out.println(itr.next());
		
		}		}
}
